<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<head>
<link href="<s:url value='/css/main.css'/>" rel="stylesheet"
	type="text/css" />
<title><s:text name="label.employees" /></title>
<style type="text/css">
th {
	text-align: center;
}
</style>
</head>
<body>
	<div class="titleDiv">
		<s:text name="application.title" />
	</div>
	<h1>
		<s:text name="label.employees" />
	</h1>
	<s:url var="url" action="employee_input" />
	<a href="<s:property value="#url"/>">添加员工</a>
	<br />
	<br />
	<table class="borderAll">
		<tr>
			<th><s:text name="label.firstName" /></th>
			<th><s:text name="label.lastName" /></th>
			<th><s:text name="label.age" /></th>
			<th><s:text name="label.department" /></th>
			<th><s:text name="label.salary" /></th>
			<th><s:text name="label.oper" /></th>
		</tr>
		<s:iterator value="employees" status="status">
			<tr class="<s:if test="#status.even">even</s:if><s:else>odd</s:else>">
				<td class="nowrap"><s:property value="firstName" /></td>
				<td class="nowrap"><s:property value="lastName" /></td>
				<td class="nowrap"><s:property value="age" /></td>
				<td class="nowrap"><s:property value="department.name" /></td>
				<td class="nowrap"><s:property value="salary" /></td>
				<td class="nowrap"><s:url action="employee_input" var="url">
						<s:param name="employee.employeeId" value="employeeId" />
					</s:url> <a href="<s:property value="#url"/>">编辑</a> &nbsp;&nbsp;&nbsp; <s:url
						action="employee_delete" var="url">
						<s:param name="employee.employeeId" value="employeeId" />
					</s:url> <a href="<s:property value="#url"/>">删除</a></td>
			</tr>
		</s:iterator>
	</table>

</body>
</html>